Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

PPM-338 Move UCI configuration to Agent DB #1590

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

orenvor
Copy link
Collaborator

@orenvor orenvor commented Aug 9, 2020

This PR moves agent configuration from the local "sPlatformSettings" struct to the AgentDB.
Preparation for unified agent task.

@orenvor orenvor force-pushed the feature/PPM-338-move-uci-config-to-agent-db branch 3 times, most recently from a6aef83 to 1e63f24 Compare August 11, 2020 09:37
@orenvor orenvor marked this pull request as ready for review August 11, 2020 09:40
@orenvor orenvor marked this pull request as draft August 11, 2020 12:24
@orenvor orenvor force-pushed the feature/PPM-338-move-uci-config-to-agent-db branch 2 times, most recently from 45ee140 to 28a3225 Compare August 12, 2020 15:01
orenvor added 12 commits August 13, 2020 10:37
Move front radio configuration from "sPlatformSettings" struct
to the AgentDB.
Replace the use of front radio settings on the Agent thread to the one
on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move back radio configuration from "sPlatformSettings" struct
to the AgentDB.
Replace the use of back radio settings on the Agent thread to the one
on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "mem_only_psk" configuration of back radio from "sPlatformSettings"
struct to the AgentDB.
Replace the use of "mem_only_psk" settings on the Agent thread to
the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "backhaul_max_vaps" configuration of back radio from
"sPlatformSettings" struct to the AgentDB.
Replace the use of "backhaul_max_vaps" settings on the Agent thread to
the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "backhaul_network_enabled" configuration of back radio from
"sPlatformSettings" struct to the AgentDB.
Replace the use of "backhaul_network_enabled" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "backhaul_preferred_radio_band" configuration of back radio from
"sPlatformSettings" struct to the AgentDB.
Replace the use of "backhaul_preferred_radio_band" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "operating_mode" configuration of from "sPlatformSettings" struct
to the AgentDB.
Replace the use of "operating_mode" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "management_mode"  configuration of from "sPlatformSettings" struct
to the AgentDB.
Replace the use of "management_mode" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "certification_mode" configuration of from "sPlatformSettings"
struct to the AgentDB.
Replace the use of "certification_mode" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "stop_on_failure_attempts" configuration from
"sPlatformSettings" struct to the AgentDB.
Replace the use of "stop_on_failure_attempts" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "client_band_steering_enabled" configuration from
"sPlatformSettings" struct to the AgentDB.
Replace the use of "client_band_steering_enabled" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "client_optimal_path_roaming_enabled" configuration from
"sPlatformSettings" struct to the AgentDB.
Replace the use of "client_optimal_path_roaming_enabled" settings on the
Agent thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
orenvor added 12 commits August 13, 2020 10:37
Move "dfs_reentry_enabled" configuration from "sPlatformSettings" struct
to the AgentDB.
Replace the use of "dfs_reentry_enabled" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "client_optimal_path_roaming_prefer_signal_strength_enabled"
configuration from "sPlatformSettings" struct to the AgentDB.
Replace the use of
"client_optimal_path_roaming_prefer_signal_strength_enabled"
settings on the Agent thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "client_11k_roaming_enabled" configuration from "sPlatformSettings"
struct to the AgentDB.
Replace the use of "client_11k_roaming_enabled" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "load_balancing_enabled" configuration from "sPlatformSettings"
struct to the AgentDB.
Replace the use of "load_balancing_enabled" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "service_fairness_enabled" configuration from "sPlatformSettings"
struct to the AgentDB.
Replace the use of "service_fairness_enabled" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "rdkb_extensions_enabled" configuration of back radio from
"sPlatformSettings" struct to the AgentDB.
Replace the use of "rdkb_extensions_enabled" settings on the Agent
thread to the one on the AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Remove unused "onboarding" configuration from "sPlatformSettings"
struct.

Replace the use of "onboarding" with false value.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Remove of unused fields from sPlatformSettings struct.
Those fields have been moved to the Agent_DB and there for no longer
needed as part of a beerocks massage.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Remove "platform_settings" local variable from son_slave_thread.
Replace the use of "platform_settings" to the settings in AgentDB.

Removing of the config from the tlvf will take place on future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Move "wlan_settings" configuration from son_slave_thread local variable
to the AgentDB.

Currently son_slave receive "wlan_settings" from platform_manager
using "PLATFORM_SON_SLAVE_REGISTER_REQUEST/RESPONSE" messages,
and save the settings in a local variable.

This transfer will be replaced by the use of agent_db to pass and
store "wlan_settings".

Removing of "sWlanSettings" from the tlvf will take place on
future commit.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
Remove of unused fields: sPlatformSettings and wlan_settings
from PLATFORM_SON_SLAVE_REGISTER_RESPONSE message.
Those fields have been moved to the Agent_DB and there for no longer
needed as part of this beerocks massage.

PPM-338

Signed-off-by: Oren Vormaser <[email protected]>
@orenvor orenvor force-pushed the feature/PPM-338-move-uci-config-to-agent-db branch from 28a3225 to 9c450e9 Compare August 13, 2020 10:37
Copy link
Collaborator

@mariomaz mariomaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's crazy to have so many commits for this task. It's been a nightmare to review and I just can barely imagine what it was to produce it.

I have a few comments but I'm approving anyway because they are easy to fix in case you decide to do so.


char ssid[beerocks::message::WIFI_SSID_MAX_LENGTH];
char pass[beerocks::message::WIFI_PASS_MAX_LENGTH];
char security_type[beerocks::message::WIFI_SECURITY_TYPE_MAX_LENGTH];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add doxygen documentation


char ssid[beerocks::message::WIFI_SSID_MAX_LENGTH];
char pass[beerocks::message::WIFI_PASS_MAX_LENGTH];
char security_type[beerocks::message::WIFI_SECURITY_TYPE_MAX_LENGTH];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add doxygen documentation

agent/src/beerocks/slave/agent_db.h Show resolved Hide resolved
@@ -160,6 +160,7 @@ class slave_thread : public beerocks::socket_thread {
std::string backhaul_manager_uds;
std::string platform_manager_uds;
sSlaveConfig config;
beerocks_message::sWlanSettings wlan_settings; // from platform manager //
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add proper doxygen documentation

@@ -208,7 +208,7 @@ static bool fill_platform_settings(
msg->platform_settings().certification_mode = uint8_t(platform_common_conf.certification_mode);
msg->platform_settings().stop_on_failure_attempts =
uint8_t(platform_common_conf.stop_on_failure_attempts);
msg->platform_settings().backhaul_max_vaps = uint8_t(platform_common_conf.backhaul_max_vaps);
db->device_conf.back_radio.backhaul_max_vaps = uint8_t(platform_common_conf.backhaul_max_vaps);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
db->device_conf.back_radio.backhaul_max_vaps = uint8_t(platform_common_conf.backhaul_max_vaps);
db->device_conf.back_radio.backhaul_max_vaps = static_cast<uint8_t>(platform_common_conf.backhaul_max_vaps);

This PR seems like a good opportunity to replace all these C style casts with the preferred C++ style casts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants